--
-- Author: yawei.zhu
-- Date: 2018-08-29 17:30:00
--
-- PvpChampionFailView
--

local fileName = string.getModeName(...)
local ClassRef = class(fileName, app.mvc.ViewBase)

ClassRef.VIEW_ROOT_RES = Res.ChampionFailScene

function ClassRef:init()
	self._ui.Button_close:addClickEventListener(function()
		executeFunc(self._onCloseView)
	end)
end

function ClassRef:refresh(data)
	self._ui.tips_1:setString( L("champion_score1") )
	if data.isKnockOut then -- 淘汰赛
		self._ui.tips_2:setString(data.szDesc)
		self._ui.tips_3:setString("")
	else
		self._ui.tips_2:setString( string.format( L("champion_score2"), data.wonTimes, data.lostTimes))
		self._ui.tips_3:setString( L("PreliminariesRules") )
	end
end

return ClassRef
